package com.ll.service;

import java.util.List;

import com.ll.vo.request.EmailMessageRequestVo;
import com.ll.vo.response.EmailMessageResponseVo;
import com.ll.vo.response.PrimaryIdVo;

public interface EmailMessageService {

	/**
	 * 发送邮件
	 * @param emailMessageRequestVo
	 * @return
	 */
	public PrimaryIdVo sendEmailMessage(EmailMessageRequestVo emailMessageRequestVo);
	
	/**
	 * 批量发送邮件
	 * @param emailMessageRequestVos
	 * @return
	 */
	public int sendEmailMessageList(List<EmailMessageRequestVo> emailMessageRequestVos);
	

	/**
	 * 删除邮件
	 * @param id
	 */
	void deleteEmailMessage(String id);
	

	/**
	 * 更新EmailMessage
	 * @param size 条数
	 * @return locked
	 */
	public String lockEmailMessage(int size);
	
	/**
	 * 根据locked查询EmailMessage
	 * @param uuid locked
	 * @return 邮件列表
	 */
	public List<EmailMessageResponseVo> findByLocked(String uuid);
	
	/**
	 * 解锁EmailMessage
	 * @param id EmailMessage的id
	 */
	public void unlockEmailMessage(String id);
	
	/**
	 * 将加锁时间过长的数据进行解锁
	 * @param lockTime 超长时间
	 */
	public void unlockEmailMessageBylockTime(long lockTime);
}
